import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)
const routes = [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    meta: {
      isShowTabbar: true
    },
    component: Home,
    children: [{
      path: 'popup',
      name: 'MyPopup',
      component: () => import('../views/MyPopup.vue')
    }]
  },
  {
    path: '/topic',
    name: 'Topic',
    meta: {
      isShowTabbar: true
    },
    component: () => import('../views/Topic.vue')
  },
  {
    path: '/category',
    name: 'Category',
    meta: {
      isShowTabbar: true
    },
    component: () => import('../views/Category.vue')
  },
  {
    path: '/buycart',
    name: 'Buycart',
    meta: {
      isShowTabbar: true
    },
    component: () => import('../views/Buycart.vue')
  },
  {
    path: '/user',
    name: 'User',
    meta: {
      isShowTabbar: true
    },
    component: () => import('../views/User.vue')
  },
  {
    path: '/categoryList',
    name: 'CategoryList',
    component: () => import('../views/CategoryList.vue')
  },
  {
    path: '/priductdet',
    name: 'Priductdet',
    component: () => import('../views/Productdet.vue')
  },
  {
    path: '/buycart',
    name: 'Buycart',
    meta: {
      isShowTabbar: true
    },
    component: () => import('../views/Buycart.vue')
  },
]
const router = new VueRouter({
  routes
})

export default router
